﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace VideoMergeSplitApp.ui.dialog
{
    public partial class InputDialog : Form
    {
        /// <summary>
        /// 结果
        /// </summary>
        public string result { get; private set; }

        public InputDialog(string title = "输入框", string prompt = "请输入文本", string defaultText = "")
        {

            InitializeComponent();
            this.Text = title;
            this.label1.Text = prompt;
            this.textBox1.Text = defaultText;
        }


        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox1.Text))
            {
                return;
            }

            result = textBox1.Text;
            DialogResult = DialogResult.OK;
            Close();
        }

      

        private void InputDialog_Load(object sender, EventArgs e)
        {
            //DialogResult = DialogResult.Cancel;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }
    }
}
